
<div class="am-modal am-modal-prompt" tabindex="-1" id="password-reset">
	<div class="am-modal-dialog">
		<div class="am-modal-hd" id="password-reset-title">修改密码</div>
		<div class="am-modal-bd" id="password-reset-content">
			请输入重置密码
			<input type="text" class="am-modal-prompt-input" id="password-reset-password">
		</div>
		<div class="am-modal-footer">
			<span class="am-modal-btn" data-am-modal-cancel>取消</span>
			<span class="am-modal-btn" data-am-modal-confirm>提交</span>
		</div>
	</div>
</div>


<script type="text/javascript">
	function resetpassword (userid,username) {
		// $('#password-reset-title') = "";
		$('#password-reset-content').html("正在重置用户" + username + "的用户名,请输入重置后的密码:"+'<input type="text" class="am-modal-prompt-input" id="password-reset-password">');
		$('#password-reset').modal({
			relatedTarget: this,
			onConfirm: function(e) {
				console.log("操作：修改密码");
				$.ajax({
					type: "post",
					dataType: "json",
					url: "{: U('password') }",
					data: {
						id : userid,  //用户ID
						password : $('#password-reset-password').val()  //用户ID
					},
					success: function(data){
						console.log(data);
						if (data.status==1) {
							amalert("",data.info,"确定");
						}else{
							amalert("",data.info,"确定");
						};
					}
				});
				console.log('你输入的是：' + e.data || '')
			},
			onCancel: function(e) {
				console.log("操作：取消");
				console.log('不想说!');
			}
		});
	}
</script>